hysop.core.memory.memory_request module¶
- class hysop.core.memory.memory_request.MemoryRequest(backend, size=None, shape=None, dtype=None, alignment=None, nb_components=1)[source]¶
Bases:
object
Memory request that can be requested in get_work_properties()
Creates a memory request to be served from given backend.
When dtype is not specified, size represents the number of bytes else the number of elements of given data type.
size can be specified directly by a n-dimensional shape parameter. In this case, depending on the chosen backend, the output buffer may be altered to accomodate this shape (like numpy n-dimensional arrays).
Every np.bool request is converted to HYSOP_BOOL dtype (ie. some integer type).
- __call__(op=None, request_identifier=None)[source]¶
Promote this MemoryRequest object to a MultipleOperatorMemoryRequests object.
- alignment¶
- backend¶
- classmethod cartesian_dfield_like(name, dfield, nb_components=None, initial_values=None, dtype=None, grid_resolution=None, ghosts=None, backend=None, is_read_only=None)[source]¶
- dtype¶
- classmethod empty_like(a, backend=None, alignment=None, dtype=None, size=None, shape=None, nb_components=None)[source]¶
- id¶
- min_dtype_alignment(dtype)[source]¶
Returns the minimum alignement of the allocated buffer (in bytes).
- min_hardware_alignment(backend)[source]¶
Returns the minimum alignement to be hardware aligned (in bytes).
- nb_components¶
- shape¶
- size¶
- class hysop.core.memory.memory_request.MultipleOperatorMemoryRequests[source]¶
Bases:
object
Set of memory requests originating from one or more operators.